Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Add watching for .json, .cjs, .mjs, and .ts #1676

Merged
merged 4 commits into from
Feb 15, 2022
Merged

CLI: Add watching for .json, .cjs, .mjs, and .ts #1676

merged 4 commits into from
Feb 15, 2022

Conversation

Krinkle
Copy link
Member

@Krinkle Krinkle commented Feb 15, 2022

No description provided.

And add tests for verifying which files are and aren't reacted to,
including coverage for the existing ignoring of events from
"node_modules".

This is prep for #1669.
…ories

Previously the callback would return true for "cwd/node_modules",
then return false for all its immediate sub directories, and also
for all its indirect subdirectories. While these directories were
eventually watched, it could sometimes take considerable time to
iterate over these.

Use node-watch's skip feature to improve on this. And while at it,
move it up a level by ignoring the top-level node_modules as well,
not merely paths that we happen to see somewhere within it. Do both
just in case we don't see the top level for some reason.
Change `run.watch()` to also apply the `--require` file, so that we
can observe any changes to `require.extensions`.

Fixes #1669.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant